package com.liyue.utillib;
import android.content.Context;
import android.util.Log;

/**
 * Created by liyue on 2021/4/8.
 */

public final class UIUtil {

    public static int dip2px(Context context, double dpValue) {
        float density = context.getResources().getDisplayMetrics().density;
        return (int) (dpValue * density + 0.5);
    }

    public static int getScreenWidth(Context context) {
        return context.getResources().getDisplayMetrics().widthPixels;
    }
    private static void test(){
        Log.d("LY", "test: SUCCESS");
    }
}